package com.assets.room.dao;

import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.Query;

import com.assets.room.entity.Worker;

import java.util.List;

@Dao
public interface WorkerDao {

    @Insert
    void insert(Worker worker);

    @Insert
    void insert(List<Worker> worker);

    @Query("SELECT * FROM t_info_worker WHERE worker_id = :worker_id")
    Worker getWorkerById(String worker_id);

//
//    @Query("SELECT * FROM t_info_worker WHERE worker_id = :worker_id")
//    Worker getWorkerById2(String worker_id);

    @Query("DELETE FROM t_info_worker")
    void deleteAllData();
}
